public class Test {
    public static void main(String[] args) {
        String str1="hello";
        String str2="helloworld";
        String str3="helloworld";
        String str4="hellow orld";

        System.out.println(str1.compareTo(str2));
        System.out.println(str3.compareTo(str4));
        System.out.println(str1.compareTo(str3));
    }
}
